package com.indsvr;

import com.indsvr.entity.response.IndSvrRoot;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;


//全局异常处理中心
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(Exception.class)
    public IndSvrRoot handlerException(Exception e) {
        e.printStackTrace();
        return IndSvrRoot.no(e.getMessage());
    }

}
